package org.karelun.gef.figure;

import org.eclipse.draw2d.BorderLayout;
import org.eclipse.draw2d.Ellipse;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;

public class InterfaceFigure extends NodeFigure {

	public InterfaceFigure() {
		super();
		label=new Label();
		BorderLayout layout = new BorderLayout();
		setLayoutManager(layout);
		
		Ellipse ellipse = new Ellipse();
		Color color = new Color(Display.getCurrent(), 255, 255, 206);
		ellipse.setBackgroundColor(color);

		ellipse.add(label);
		add(ellipse,BorderLayout.CENTER);
		setOpaque(true);
	}

	public void setBounds(Rectangle rect) {
		super.setBounds(rect);
		this.label.setBounds(rect);
	}

	@Override
	protected void setBGColor(Color color) {
		setBackgroundColor(color);
	}
}
